package test.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import test.domin.CpuInfo;
import test.utils.SystemUtil;

/**
 * Describe: 服务器控制器
 * Author: 就 眠 仪 式
 * CreateTime: 2019/10/23
 */
@RestController
@RequestMapping( "/monitor")
public class SysMonitorController  {

    @GetMapping("/main")
    public CpuInfo main() {
        CpuInfo cpu = SystemUtil.getCpu();
        return cpu;
    }
}
